#ifndef BoxSelector_h__
#define BoxSelector_h__
#include "Vec2.hpp"
class MeshView;
#include "GeometryTypes.hpp"

// contains selection logic
class VertexSelector
{
public:
   VertexSelector();
   void DrawWindow();
   void DrawBox();
   int handle(int event);
   int handleBox(int event);
   void SelectAll();
   void SelectFromVerts(MeshView&         aMesh,
                        std::vector<int>& aVerts);
   void SelectVerts(MeshView&         aMesh,
                    std::vector<int>& aVerts);
   void SelectLoops(MeshView&         aMesh,
                    std::vector<int>& aVerts);
   void SelectInterface(Vec3      p,
                        Vec3      v,
                        MeshView& aMesh);
   void SelectFace(Vec3      p,
                   Vec3      v,
                   MeshView& aMesh);
   Edge GetHitEdge(Vec3      p,
                   Vec3      v,
                   MeshView& aMesh);
   void SelectEdgePatch(Vec3      p,
                         Vec3      v,
                         MeshView& aMesh);
   int GetHitFace(Vec3      p,
                  Vec3      v,
                  MeshView& aMesh);
   void SetSelectOperation();
   enum SelectType
   {
      cNORMAL,
      cAND,cOR
   };
   
   SelectType mSelectType;
   bool  mBoxReady;
   bool  mBoxStarted;
   Vec2  mDownPoint;
   Vec2  mUpPoint;

   
   

};

#endif // BoxSelector_h__
